<%attr>
	sHead => "edit subcategory"
</%attr>
<%init>
	my $subcategory = $m->comp("../dao/subcategory_dao.mi:findById", id => $m->notes('url_id'));
	my @categories = $m->comp("../dao/category_dao.mi:findAll");
	$m->comp("../view/edit.mi", entity => $subcategory, entity_name => 'subcategory', 
		field_names => ['name', 'cat_id'], 
		field_titles => { 'name' => 'name', 'cat_id' => 'category' },
		field_constraints => { 'cat_id' => \@categories} );
</%init>
